home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / qwik30.arc / CURSOR.INC < prev    next >
Text File  |  1991-01-09  |  3KB  |  62 lines

  1. { Cursor.inc - GotoRC,CursorChange,CursorOff,CursorOn       ver 3.0, 08-31-87 }
  2.  
  3. { GotoRC - move cursor                                      ver 1.3, 11-10-86 }
  4. procedure GotoRC (Row,Col: byte);
  5. begin
  6. Inline(                  {Assembly by Inline 08/17/87 12:10}
  7.   $B4/$02/               {       mov   ah,$02           ;Set AH = $02}
  8.   $31/$DB/               {       xor   bx,bx            ;Set BX=0}
  9.   $8E/$C3/               {       mov   es,bx            ;Set ES=0}
  10.   $26/                   {       es:                    ;Segment override}
  11.   $8A/$3E/$62/$04/       {       mov   bh,[$0462]       ;Set BH=current page}
  12.   $8A/$76/<ROW/          {       mov   dh,[bp+<Row]     ;Move Row}
  13.   $FE/$CE/               {       dec   dh               ;Convert to 0-?? range}
  14.   $8A/$56/<COL/          {       mov   dl,[bp+<Col]     ;Move Col}
  15.   $FE/$CA/               {       dec   dl               ;Convert to 0-?? range}
  16.   $CD/$10);              {       int   $10              ;Set cursor position}
  17. end;
  18.  
  19. { CursorChange - changes type or hides cursor, saves old    ver 1.3, 11-10-86 }
  20. procedure CursorChange (New: integer; VAR Old: integer);
  21. begin
  22. Inline(                  {Assembly by Inline 08/17/87 12:10}
  23.   $31/$C0/               {       xor   ax,ax            ;Set AX=0}
  24.   $8E/$C0/               {       mov   es,ax            ;Set ES=0}
  25.   $26/                   {       es:                    ;Segment override}
  26.   $A1/$60/$04/           {       mov   ax,wo[$0460]     ;Read old cursor mode}
  27.   $C4/$7E/<OLD/          {       les   di,[bp+<Old]     ;Set address for Old}
  28.   $AB/                   {       stosw                  ;Store old value}
  29.   $B4/$01/               {       mov   ah,$01           ;}
  30.   $8B/$4E/<NEW/          {       mov   cx,[bp+<New]     ;Get New value}
  31.   $CD/$10);              {       int   $10              ;Set cursor change}
  32. end;
  33.  
  34. { CursorOff - turns cursor off                              ver 3.0, 08-31-87 }
  35. procedure CursorOff;
  36. begin
  37. Inline(                  {Assembly by Inline 08/17/87 12:10}
  38.   $31/$C0/               {       xor   ax,ax            ;Set AX=0}
  39.   $8E/$C0/               {       mov   es,ax            ;Set ES=0}
  40.   $26/                   {       es:                    ;Segment override}
  41.   $A1/$60/$04/           {       mov   ax,wo[$0460]     ;Read old cursor mode}
  42.   $80/$E4/$BF/           {       and   ah,$BF           ;Clear blink bit}
  43.   $80/$CC/$20/           {       or    ah,$20           ;Set hide bit}
  44.   $89/$C1/               {       mov   cx,ax            ;Move mode}
  45.   $B4/$01/               {       mov   ah,$01           ;Set function = $01}
  46.   $CD/$10);              {       int   $10              ;Set cursor change}
  47. end;
  48.  
  49. { CursorOn - turns cursor on                                ver 3.0, 08-31-87 }
  50. procedure CursorOn;
  51. begin
  52. Inline(                  {Assembly by Inline 08/17/87 12:10}
  53.   $31/$C0/               {       xor   ax,ax            ;Set AX=0}
  54.   $8E/$C0/               {       mov   es,ax            ;Set ES=0}
  55.   $26/                   {       es:                    ;Segment override}
  56.   $A1/$60/$04/           {       mov   ax,wo[$0460]     ;Read old cursor mode}
  57.   $80/$E4/$DF/           {       and   ah,$DF           ;Clear hide bit}
  58.   $89/$C1/               {       mov   cx,ax            ;Move mode}
  59.   $B4/$01/               {       mov   ah,$01           ;Set function = $01}
  60.   $CD/$10);              {       int   $10              ;Set cursor change}
  61. end;
  62.